package nciae.db.service;

import com.baomidou.mybatisplus.extension.service.IService;
import nciae.db.common.CommonResult;
import nciae.db.pojo.dto.ApiGetDateLogDTO;
import nciae.db.pojo.dto.ApiInsertAttendenceDTO;
import nciae.db.pojo.dto.ApiRevisePwdDTO;
import nciae.db.pojo.dto.StudentUpdateRequest;
import nciae.db.pojo.entity.Student;
import nciae.db.pojo.entity.User;
import nciae.db.pojo.vo.ApiGetDateLogVO;
import nciae.db.pojo.vo.ApiStudentLoginVO;
import nciae.db.pojo.vo.ApiTotalScoreVO;
import nciae.db.pojo.vo.StudentVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface StudentService extends IService<Student> {

    public CommonResult<List<StudentVO>> search(Integer page, Integer size, String name, String department, String tel, String project, String classs, String expert);

    public CommonResult<Boolean> delete(Integer id);

    public StudentVO getUserInfo(Integer id);

    public CommonResult<Boolean> save(StudentUpdateRequest student);

    public CommonResult<String>uploadDairyFile(MultipartFile file, Long userId, Long projectId);
    /**
     * 通过班级id获取所有的学员
     * @param classId
     * @return
     */
    List<Student> getStudentsByClassId(Long classId);

    /**
     * 重置密码
     * @param id
     * @return
     */
    boolean resetPassword(Long id);


    CommonResult<Integer> batchImport( String className,  String chargerName, String projectName, MultipartFile file);

   public CommonResult<Boolean> assignStudentsToExpert(List<Integer> studentIds, Integer expertId);

    public CommonResult<ApiStudentLoginVO> login(String tel, String password);

    public CommonResult<Boolean> apiInsertAttendence(ApiInsertAttendenceDTO apiInsertAttendenceDTO);

    CommonResult<ApiTotalScoreVO> getScoreInfo(Integer userId,Integer projectId);

    CommonResult<Boolean> revisePassword(ApiRevisePwdDTO apiRevisePwdDTO);

    CommonResult<ApiGetDateLogVO> apiGetDateLog(Long userId, Long projectId, String date);
}
